home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ada / gnat1792.zip / gnat179b / t-adainc / a-charac.ads < prev    next >
Text File  |  1994-05-19  |  5KB  |  138 lines

  1. -----------------------------------------------------------------------------
  2. --                                                                          --
  3. --                         GNAT RUNTIME COMPONENTS                          --
  4. --                                                                          --
  5. --                       A D A . C H A R A C T E R S                        --
  6. --                                                                          --
  7. --                                 S p e c                                  --
  8. --                                                                          --
  9. --                            $Revision: 1.4 $                              --
  10. --                                                                          --
  11. --           Copyright (c) 1992,1993,1994 NYU, All Rights Reserved          --
  12. --                                                                          --
  13. -- GNAT is free software;  you can  redistribute it  and/or modify it under --
  14. -- terms of the  GNU General Public License as published  by the Free Soft- --
  15. -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
  16. -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
  17. -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
  18. -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
  19. -- for  more details.  You should have  received  a copy of the GNU General --
  20. -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
  21. -- to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. --
  22. --                                                                          --
  23. ------------------------------------------------------------------------------
  24.  
  25.  
  26. package Ada.Characters is
  27.    pragma Pure (Ada.Characters);
  28.  
  29.    ----------------------------------------
  30.    -- Character Classification Functions --
  31.    ----------------------------------------
  32.  
  33.    function Is_Control (Item : in Character) return Boolean;
  34.    pragma Inline (Is_Control);
  35.  
  36.    function Is_Graphic (Item : in Character) return Boolean;
  37.    pragma Inline (Is_Graphic);
  38.  
  39.    function Is_Letter (Item : in Character) return Boolean;
  40.    pragma Inline (Is_Letter);
  41.  
  42.    function Is_Lower (Item : in Character) return Boolean;
  43.    pragma Inline (Is_Lower);
  44.  
  45.    function Is_Upper (Item : in Character) return Boolean;
  46.    pragma Inline (Is_Upper);
  47.  
  48.    function Is_Basic (Item : in Character) return Boolean;
  49.    pragma Inline (Is_Basic);
  50.  
  51.    function Is_Digit (Item : in Character) return Boolean;
  52.    pragma Inline (Is_Digit);
  53.  
  54.    function Is_Decimal_Digit (Item : in Character) return Boolean
  55.      renames Is_Digit;
  56.  
  57.    function Is_Hexadecimal_Digit (Item : in Character) return Boolean;
  58.    pragma Inline (Is_Hexadecimal_Digit);
  59.  
  60.    function Is_Alphanumeric (Item : in Character) return Boolean;
  61.    pragma Inline (Is_Alphanumeric);
  62.  
  63.    function Is_Special_Graphic (Item : in Character) return Boolean;
  64.    pragma Inline (Is_Special_Graphic);
  65.  
  66.    ------------------------------------
  67.    -- Character Conversion Functions --
  68.    ------------------------------------
  69.  
  70.    function To_Lower (Item : in Character) return Character;
  71.    pragma Inline (To_Lower);
  72.  
  73.    function To_Upper (Item : in Character) return Character;
  74.    pragma Inline (To_Upper);
  75.  
  76.    function To_Basic (Item : in Character) return Character;
  77.    pragma Inline (To_Basic);
  78.  
  79.    ---------------------------------
  80.    -- String Conversion Functions --
  81.    ---------------------------------
  82.  
  83.    function To_Lower (Item : in String) return String;
  84.    function To_Upper (Item : in String) return String;
  85.    function To_Basic (Item : in String) return String;
  86.  
  87.    ----------------------------------------------------------------------
  88.    -- Classifications of and Conversions Between Character and ISO 646 --
  89.    ----------------------------------------------------------------------
  90.  
  91.    subtype ISO_646 is
  92.      Character range Character'Val (0) .. Character'Val (127);
  93.  
  94.    function Is_ISO_646 (Item : in Character) return Boolean;
  95.    pragma Inline (Is_ISO_646);
  96.  
  97.    function Is_ISO_646 (Item : in String)    return Boolean;
  98.  
  99.    function To_ISO_646 (
  100.      Item       : in Character;
  101.      Substitute : in ISO_646 := ' ')
  102.      return ISO_646;
  103.    pragma Inline (To_ISO_646);
  104.  
  105.    function To_ISO_646 (Item : in String; Substitute : in ISO_646 := ' ')
  106.      return String;
  107.  
  108.    ------------------------------------------------------
  109.    -- Classifications of Wide_Character and Characters --
  110.    ------------------------------------------------------
  111.  
  112.    function Is_Character (Item : in Wide_Character) return Boolean;
  113.    pragma Inline (Is_Character);
  114.  
  115.    function Is_String (Item : in Wide_String)    return Boolean;
  116.  
  117.    ------------------------------------------------------
  118.    -- Conversions between Wide_Character and Character --
  119.    ------------------------------------------------------
  120.  
  121.    function To_Character (
  122.      Item       : in Wide_Character;
  123.      Substitute : in Character := ' ')
  124.      return Character;
  125.    pragma Inline (To_Character);
  126.  
  127.    function To_String (
  128.      Item       : in Wide_String;
  129.      Substitute : in Character := ' ')
  130.      return String;
  131.  
  132.    function To_Wide_Character (Item : in Character) return Wide_Character;
  133.    pragma Inline (To_Wide_Character);
  134.  
  135.    function To_Wide_String (Item : in String) return Wide_String;
  136.  
  137. end Ada.Characters;
  138.